import request from '@/utils/request'

export default{
    saveCourseInfo(courseInfo){
        return request({
            url: `/eduservice/course/addCourseInfo`,
            method: 'post',
            data: courseInfo
          })  
    },
    getAllTeacher(){
        return request({
            url: `/eduservice/teacher/findAll`,
            method: 'get'
          })
    },
    getCourseInfo(courseId){
        return request({
            url: `/eduservice/course/getCourseInfo/${courseId}`,
            method: 'get'
          })  
    },
    updateCourseInfo(courseInfo){
        return request({
            url: `/eduservice/course/updateCourseInfo`,
            method: 'post',
            data: courseInfo
          })  
    },
    getCoursePublishVoInfo(courseId){
        return request({
            url: `/eduservice/course/getCoursePublishVo/${courseId}`,
            method: 'get'
          })  
    },
    //发布课程
    publishCourse(courseId){
        return request({
            url: `/eduservice/course/finalPublish/${courseId}`,
            method: 'post'
          })  
    },
    getList(current,limit,courseQuery){
        return request({
            url: `/eduservice/course/list/${current}/${limit}`,
            method: 'post',
            data: courseQuery
          })  
    },
    deleteCourse(courseId){
        return request({
            url: `/eduservice/course/deleteCourse/${courseId}`,
            method: 'delete'
          })  
    }
}

